﻿@model StudyEnglish.Application.Filter.BaseFilter
@{
    var selectedFilterItems = Model.SelectedItems;
    if (selectedFilterItems.Count != 0)
    {
        <p>Selected filters</p>
        foreach (var filterItem in selectedFilterItems)
        {
            <img style="vertical-align: middle; margin-right: 5px" src="../../../Content/images/removeFilter.png" alt="" />
            <a href="@Model.GetUrlForRemovingItem(filterItem)">@filterItem.Name</a>
            <br />
        }

        <br />
        <img style="vertical-align: middle;margin-right: 5px" src="../../../Content/images/removeFilter.png"
            alt="" />
        <a href="@Model.InitialUrl">Remove all filters</a>
    }

    foreach (var cat in Model.Categories)
    {
        if (cat.NotSelectedItems.Count > 0)
        {
            <p style="margin-top: 10px; font-weight: bold; margin-bottom: 4px;">@cat.Name</p>
            foreach (var filterItem in cat.NotSelectedItems) 
            {
                <img style="vertical-align: middle;margin-right: 5px" src="../../../Content/images/addFilter.png" alt="" />
                <a href="@Model.GetUrlForAddingItem(filterItem)">@filterItem.Name</a>
                <br />
            }
        }
    }
}
